//生成随机数Id,以方便存入MAP中，同时为了删除好删除，因为是最后是一次性进库，所以得有个KEY好用来区分
//用法：生成1-32位随机串：randomWord(true, 1, 32)
function randomString(randomFlag, min, max){
    var str = "";
    var range = min;
    var arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 
               'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 
               'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
    // 随机产生
    if(randomFlag){
        range = Math.round(Math.random() * (max-min)) + min;
    }
    for(var i=0; i<range; i++){
        pos = Math.round(Math.random() * (arr.length-1));
        str += arr[pos];
    }
    return str;
}
//TAB显示隐藏方法
function jspShowTab(liId){
	$("#pop-up_tag_a").attr("class","pop-up_tag_hov");
	$("#pop-up_tag_b").attr("class","pop-up_tag_hov");
	$("#pop-up_tag_c").attr("class","pop-up_tag_hov")
	$("#"+liId).attr("class","pop-up_tag_a");
	
	$("#pop-up_tag_a_div").hide();
	$("#pop-up_tag_b_div").hide();
	$("#pop-up_tag_c_div").hide();
	$("#"+liId+"_div").show();
	if(liId == "pop-up_tag_c"){
		loadColSelect();
	}
	DivSetVisibleCellCond(false);
}
/*--------------------------------------------------------总控条件的JS---------------------------------------------------------------------*/
//存放总控条件的MAP
var zongkongtiaojianMap = new Map();
//给总控条件增加一行
function addRowZongkong(tableId){
	var xinxijiValue = $("#dataSetSelectZongkong").find("option:selected").text();
	var xinxijiId = $("#dataSetSelectZongkong").find("option:selected").val();
	var xinxixiangValue = $("#dataItemSelectZongkong").find("option:selected").text();
	var xinxixiangId = $("#dataItemSelectZongkong").find("option:selected").val();
	var luojiyusuanfuValue = $("#logicOperationType").find("option:selected").text();
	var luojiyusuanfuId = $("#logicOperationType").find("option:selected").val();
	var zongkongValue = $("#zongkongValue").val();
	var shifouyouxianValue = $("#bracketsType").find("option:selected").text();
	var shifouyouxianId = $("#bracketsType").find("option:selected").val();
	var lianjieValue = $("#connectorType").find("option:selected").text();
	var lianjieId = $("#connectorType").find("option:selected").val();
	if(xinxijiId == "0"){
		alert("请选择统计信息集");
		return false;
	}
	if(xinxixiangId == null || xinxixiangId == '' || xinxixiangId == '0'){
		alert("请选择统计信息项");
		return false;
	}
	if(zongkongValue == "" || zongkongValue == null){
		alert("请填写总控条件的值");
		return false;
	}
	//生成1-32位随机串
	var zongkongMapKey = randomString(true, 1, 32);
	var tableTr = handleData(xinxijiValue,xinxixiangValue,luojiyusuanfuValue,zongkongValue,shifouyouxianValue,zongkongMapKey,lianjieValue);
	$("#"+tableId).append(tableTr);
	var zongKongShiTi = new ZongKongShiTi(xinxijiId,xinxixiangId,luojiyusuanfuId,shifouyouxianId,zongkongValue,lianjieId);
	zongkongtiaojianMap.put(zongkongMapKey,zongKongShiTi);
	$("#bracketsType option[value='0']").attr("selected","selected");
	$("#connectorType option[value='0']").attr("selected","selected");
}
//具体实现方法
function handleData(xinxijiValue,xinxixiangValue,luojiyusuanfuValue,zongkongValue,shifouyouxianValue,zongkongMapKey,lianjieValue){
	var tr = '<tr id="' + zongkongMapKey + 'Tr">';
    tr += '<td align="center" valign="middle" class="td_grey2">' + xinxijiValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + xinxixiangValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + luojiyusuanfuValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + zongkongValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2">' + shifouyouxianValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2">' + lianjieValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2" id="' + zongkongMapKey + '"><a href="#" onclick="deleteZongkongtiaojianTableTr(this)">删除</a>';
    tr += '||';
    tr += '<a href="#" onclick="tableTrUp(this)">上移</a>';
    tr += '||';
    tr += '<a href="#" onclick="tableTrDown(this)">下移</a></td>';
    tr += '<td style="display:none">' + zongkongMapKey + '</td>';
    tr += '</tr>';
    return tr;  
}

//参数分别为“信息集ID”、“信息项ID”、“逻辑预算符ID”、“是否优先查询”、“总控条件下的值”、“连接符”,“条件的顺序”
function ZongKongShiTi(xinxijiId,xinxixiangId,luojiyusuanfuId,shifouyouxianId,zongkongZhi,lianjieId,orderId){
	this.xinxijiId=xinxijiId;
	this.xinxixiangId=xinxixiangId;
	this.luojiyusuanfuId=luojiyusuanfuId;
	this.shifouyouxianId=shifouyouxianId;
	this.zongkongZhi=zongkongZhi;
	this.lianjieId=lianjieId;
	this.orderId=orderId;
}
//删除一行
function deleteZongkongtiaojianTableTr(obj){
	var id=$(obj).parent().attr('id');
	//删除表格里面的TR
	$('#'+id).parent().remove();
	//删除MAP里面的总控对象条件
	zongkongtiaojianMap.remove(id);
}

//上移一行
function tableTrUp(obj){
	var i=$(obj).parent().parent().index();
	if(i>1){//不是表头，也不是第一行，则可以上移
       var tem0=$(obj).parent().parent().html();
       var tem0Id=$(obj).parent().parent().attr('id');
       var tem1=$(obj).parent().parent().prev().html();
       var tem1Id = $(obj).parent().parent().prev().attr('id');
       var temTemporaryId = tem0Id;
       var tem0Id=$(obj).parent().parent().attr('id',tem1Id);
       var tem1Id = $(obj).parent().parent().prev().attr('id',temTemporaryId);
       $(obj).parent().parent().prev().html(tem0);
       $(obj).parent().parent().html(tem1);
     }
}
//下移一行
function tableTrDown(obj){
	var tableName = $(obj).parent().parent().parent().parent().attr('id');
	var l=$("#"+tableName+" tr").length;//总行数
    var i=$(obj).parent().parent().index();//当前行的id
    if(i<l-1){//不是最后一行，则可以下移
      var tem0=$(obj).parent().parent().html();
      var tem0Id=$(obj).parent().parent().attr('id');
	  var tem1=$(obj).parent().parent().next().html();
	  var tem1Id = $(obj).parent().parent().next().attr('id');
	  var temTemporaryId = tem0Id;
	  var tem0Id=$(obj).parent().parent().attr('id',tem1Id);
      var tem1Id = $(obj).parent().parent().next().attr('id',temTemporaryId);
	  $(obj).parent().parent().next().html(tem0);
	  $(obj).parent().parent().html(tem1);
    }
}

/*--------------------------------------------------------总控条件的JS---------------------------------------------------------------------*/
/*--------------------------------------------------------行条件的JS---------------------------------------------------------------------*/
function subNum(){
	var oldValue=parseInt($("#hangNum").val()); //取出现在的值，并使用parseInt转为int类型数据
	if(oldValue != 0){
		oldValue--;  //自减1
		$("#hangNum").val(oldValue);
	}
}
function addNum(){
	var oldValue=parseInt($("#hangNum").val()); //取出现在的值，并使用parseInt转为int类型数据
    oldValue++;   //自加1
    $("#hangNum").val(oldValue);  
}
//存放行条件的MAP
var hangtiaojianMap = new Map();
//行条件增加一行
function addRowHang(tableId){
	var hXinxijiValue = $("#dataSetSelectHang").find("option:selected").text();
	var hXinxijiId = $("#dataSetSelectHang").find("option:selected").val();
	var hXinxixiangValue = $("#dataItemSelectHang").find("option:selected").text();
	var hXinxixiangId = $("#dataItemSelectHang").find("option:selected").val();
	var hLuojiyusuanfuValue = $("#hLogicOperationType").find("option:selected").text();
	var hLuojiyusuanfuId = $("#hLogicOperationType").find("option:selected").val();
	var hangValue = $("#hangValue").val();
	var hShifouyouxianValue = $("#hBracketsType").find("option:selected").text();
	var hShifouyouxianId = $("#hBracketsType").find("option:selected").val();
	var hLianjieValue = $("#hConnectorType").find("option:selected").text();
	var hLianjieId = $("#hConnectorType").find("option:selected").val();
	var hangNum = $("#hangNum").val();
	
	if(hXinxijiId == "0"){
		alert("请选择统计信息集");
		return false;
	}
	if(hXinxixiangId == "0"){
		alert("请选择统计信息项");
		return false;
	}
	if(hangValue == null || hangValue == ''){
		alert("请填写行条件的值");
		return false;
	}
	//生成1-32位随机串
	var hangMapKey = randomString(true, 1, 32);
	var tableTr = handleDataHang(hXinxijiValue,hXinxixiangValue,hLuojiyusuanfuValue,hangValue,hShifouyouxianValue,hangMapKey,hLianjieValue,hangNum);
	$("#"+tableId).append(tableTr);
	var hangShiTi = new HangShiTi(hXinxijiId,hXinxixiangId,hLuojiyusuanfuId,hShifouyouxianId,hangValue,hLianjieId,hangNum);
	hangtiaojianMap.put(hangMapKey,hangShiTi);
	$("#hBracketsType option[value='0']").attr("selected","selected");
	$("#hConnectorType option[value='0']").attr("selected","selected");
}

//具体实现方法
function handleDataHang(hXinxijiValue,hXinxixiangValue,hLuojiyusuanfuValue,hangValue,hShifouyouxianValue,hangMapKey,hLianjieValue,hangNum){
	var tr = '<tr id="' + hangMapKey + 'Tr">';
	tr += '<td align="center" valign="middle" class="td_grey2">第' + hangNum + '行</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + hXinxijiValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + hXinxixiangValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + hLuojiyusuanfuValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + hangValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2">' + hShifouyouxianValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2">' + hLianjieValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2" id="' + hangMapKey + '"><a href="#" onclick="deleteHangtiaojianTableTr(this)">删除</a>';
    tr += '||';
    tr += '<a href="#" onclick="tableTrUp(this)">上移</a>';
    tr += '||';
    tr += '<a href="#" onclick="tableTrDown(this)">下移</a></td>';
    tr += '<td style="display:none">' + hangMapKey + '</td>';
    tr += '</tr>';
    return tr;  
}

//参数分别为“信息集ID”、“信息项ID”、“逻辑预算符ID”、“是否优先查询”、“总控条件下的值”、“连接符”、“哪一行”、“行顺序”
function HangShiTi(hXinxijiId,hXinxixiangId,hLuojiyusuanfuId,hShifouyouxianId,hangZhi,hLianjieId,hangNum,orderId){
	this.hXinxijiId=hXinxijiId;
	this.hXinxixiangId=hXinxixiangId;
	this.hLuojiyusuanfuId=hLuojiyusuanfuId;
	this.hShifouyouxianId=hShifouyouxianId;
	this.hangZhi=hangZhi;
	this.hLianjieId=hLianjieId;
	this.hangNum=hangNum;
	this.orderId=orderId;
}
//删除一行
function deleteHangtiaojianTableTr(obj){
	var id=$(obj).parent().attr('id');
	//删除表格里面的TR
	$('#'+id).parent().remove();
	//删除MAP里面的总控对象条件
	hangtiaojianMap.remove(id);
}
/*--------------------------------------------------------行条件的JS---------------------------------------------------------------------*/
/*--------------------------------------------------------列条件的JS---------------------------------------------------------------------*/
//存放列条件的MAP
var lietiaojianMap = new Map();
//点击列条件标签时，加载这个方法，把列数转换成ABCD的列，方便用户使用
function loadColSelect(){
	var condStartColValueHidden = $("#condStartColValueHidden").val();
	var condEndColValueHidden = $("#condEndColValueHidden").val();
	var colSelectOptions = "";
	var colSelectOptionsFirst="<option value='0'>请选择</option>";
	var b = parseInt(condEndColValueHidden)+parseInt(1);
	for(var a = parseInt(condStartColValueHidden); a < b; a++){
		var letter = letterMapNum.get(a);
		colSelectOptions += "<option value='" + a + "'>" + letter + "</option>";
	}
	$("#colSelect option").remove();
	$(".colSelectClass").append(colSelectOptionsFirst).append(colSelectOptions);
}

function addRowLie(tableId){
	var lieNumValue = $("#colSelect").find("option:selected").text();
	var lieNumId = $("#colSelect").find("option:selected").val();
	var lXinxijiValue = $("#dataSetSelectLie").find("option:selected").text();
	var lXinxijiId = $("#dataSetSelectLie").find("option:selected").val();
	var lXinxixiangValue = $("#dataItemSelectLie").find("option:selected").text();
	var lXinxixiangId = $("#dataItemSelectLie").find("option:selected").val();
	var lLuojiyusuanfuValue = $("#lLogicOperationType").find("option:selected").text();
	var lLuojiyusuanfuId = $("#lLogicOperationType").find("option:selected").val();
	var lieValue = $("#lieValue").val();
	var lShifouyouxianValue = $("#lBracketsType").find("option:selected").text();
	var lShifouyouxianId = $("#lBracketsType").find("option:selected").val();
	var lLianjieValue = $("#lConnectorType").find("option:selected").text();
	var lLianjieId = $("#lConnectorType").find("option:selected").val();
	if(lXinxijiId == "0"){
		alert("请选择统计信息集");
		return false;
	}
	if(lXinxixiangId == "0"){
		alert("请选择统计信息项");
		return false;
	}
	if(lieValue == null || lieValue == ''){
		alert("请填写列条件的值");
		return false;
	}
	//生成1-32位随机串
	var lieMapKey = randomString(true, 1, 32);
	var tableTr = handleDataLie(lXinxijiValue,lXinxixiangValue,lLuojiyusuanfuValue,lieValue,lShifouyouxianValue,lieMapKey,lLianjieValue,lieNumValue);
	$("#"+tableId).append(tableTr);
	var lieShiTi = new LieShiTi(lXinxijiId,lXinxixiangId,lLuojiyusuanfuId,lShifouyouxianId,lieValue,lLianjieId,lieNumId);
	lietiaojianMap.put(lieMapKey,lieShiTi);
	$("#lBracketsType option[value='0']").attr("selected","selected");
	$("#lConnectorType option[value='0']").attr("selected","selected");
}
//具体实现方法
function handleDataLie(lXinxijiValue,lXinxixiangValue,lLuojiyusuanfuValue,lieValue,lShifouyouxianValue,lieMapKey,lLianjieValue,lieNumValue){
	var tr = '<tr id="' + lieMapKey + 'Tr">';
	tr += '<td align="center" valign="middle" class="td_grey2">' + lieNumValue + '列</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + lXinxijiValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + lXinxixiangValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + lLuojiyusuanfuValue + '</td>';  
    tr += '<td align="center" valign="middle" class="td_grey2">' + lieValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2">' + lShifouyouxianValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2">' + lLianjieValue + '</td>';
    tr += '<td align="center" valign="middle" class="td_grey2" id="' + lieMapKey + '"><a href="#" onclick="deleteLietiaojianTableTr(this)">删除</a>';
    tr += '||';
    tr += '<a href="#" onclick="tableTrUp(this)">上移</a>';
    tr += '||';
    tr += '<a href="#" onclick="tableTrDown(this)">下移</a></td>';
    tr += '<td style="display:none">' + lieMapKey + '</td>';
    tr += '</tr>';
    return tr;  
}
//参数分别为“信息集ID”、“信息项ID”、“逻辑预算符ID”、“是否优先查询”、“列条件下的值”、“连接符”、“哪一列Id”、“列的序号”
function LieShiTi(lXinxijiId,lXinxixiangId,lLuojiyusuanfuId,lShifouyouxianId,lieZhi,lLianjieId,lieNumId,orderId){
	this.lXinxijiId=lXinxijiId;
	this.lXinxixiangId=lXinxixiangId;
	this.lLuojiyusuanfuId=lLuojiyusuanfuId;
	this.lShifouyouxianId=lShifouyouxianId;
	this.lieZhi=lieZhi;
	this.lLianjieId=lLianjieId;
	this.lieNumId=lieNumId;
	this.orderId=orderId;
}
//删除一行
function deleteLietiaojianTableTr(obj){
	var id=$(obj).parent().attr('id');
	//删除表格里面的TR
	$('#'+id).parent().remove();
	//删除MAP里面的总控对象条件
	lietiaojianMap.remove(id);
}
/*--------------------------------------------------------列条件的JS---------------------------------------------------------------------*/

/*--------------------------------------------------------总控条件，行列条件的保存--------------------------------------------------------*/
function saveConditions(){
	$("#but_save").attr('disabled','true');
	var zongkongTiaojianTable = $("#zongkongtiaojianTable tr").length;
	var hangtiaojianTable = $("#hangtiaojianTable tr").length;
	var lietiaojianTable = $("#lietiaojianTable tr").length;
	if(zongkongTiaojianTable < 2 && hangtiaojianTable < 2 && lietiaojianTable < 2){
		alert("请先添加总控条件、行条件或列条件");
		return false;
	}
	
	/*var zongkongtiaojianMapKey = $("#zongkongtiaojianTable tr:eq(1)").attr('id');
	alert(zongkongtiaojianMapKey);*/
	//获取总控条件表的总行数
	var zongkongLength=$("#zongkongtiaojianTable tr").length;
	//因为第一行是表头，所以从第二行开始
	for(var a = 1; a < zongkongLength; a++){
		var zongkongtiaojianMapKey = $("#zongkongtiaojianTable tr:eq("+ a +")").attr('id');
		//去掉TR id中的TR
		var zongkongtiaojianMapKeyNew = zongkongtiaojianMapKey.replace("Tr","");
		var zongKongShiTi = zongkongtiaojianMap.get(zongkongtiaojianMapKeyNew);
		zongKongShiTi.orderId = a;
	}
	
	//获取行条件表的总行数
	var hangTableLength=$("#hangtiaojianTable tr").length;
	//因为第一行是表头，所以从第二行开始
	for(var a = 1; a < hangTableLength; a++){
		var hangtiaojianMapKey = $("#hangtiaojianTable tr:eq("+ a +")").attr('id');
		//去掉TR id中的TR
		var hangtiaojianMapKeyNew = hangtiaojianMapKey.replace("Tr","");
		var hangShiTi = hangtiaojianMap.get(hangtiaojianMapKeyNew);
		hangShiTi.orderId = a;
	}
	
	//获取列条件表的总行数
	var lieTableLength=$("#lietiaojianTable tr").length;
	//因为第一行是表头，所以从第二行开始
	for(var a = 1; a < lieTableLength; a++){
		var lietiaojianMapKey = $("#lietiaojianTable tr:eq("+ a +")").attr('id');
		//去掉TR id中的TR
		var lietiaojianMapKeyNew = lietiaojianMapKey.replace("Tr","");
		var lieShiTi = lietiaojianMap.get(lietiaojianMapKeyNew);
		lieShiTi.orderId = a;
	}
	
	var templateId = $("#templateId").val();
	var dataSetSelectId = $("#dataSetSelect").val();
	var dataItemSelectId = $("#dataItemSelect").val();
	var zongkongText=JSON.stringify(zongkongtiaojianMap);
	var hangText=JSON.stringify(hangtiaojianMap);
	var lieText=JSON.stringify(lietiaojianMap);
	var itemStatTimeSelectId = $("#itemStatTimeSelect").val();
	var itemUnitIdSelectId = $("#itemUnitIdSelect").val();
	$.ajax({
	   type: "POST",
	   url: ctx+"/reportTemplateConditionsController/saveConditions/"+templateId,
	   data: {zongkongText:zongkongText,hangText:hangText,lieText:lieText,dataSetSelectId:dataSetSelectId,dataItemSelectId:dataItemSelectId,itemStatTimeSelectId:itemStatTimeSelectId,itemUnitIdSelectId:itemUnitIdSelectId},
	   success: function(){
		   alert("保存成功");
		   $('#but_save').removeAttr("disabled"); 
	   }
	});
}

/*--------------------------------------------------------页面加载时，加载所有总控条件，行列条件---------------------------------------------*/
//总控条件
function jspLoadZongkong(){
	var templateId = $("#templateId").val();
	$.ajax({
	   type: "POST",
	   url: ctx+"/reportTemplateConditionsController/getZongkongCondByTemplateId/"+templateId,
	   success:function(data){
		    $.each(data,function(idx,item){
		    	var tableTr = handleData(item.chineseName,item.itemChineseName,item.jspRelaOperatorShow,item.conditionVal,item.jspComboTypeShow,item.conditionId,item.jspLogicOperatorShow);
		    	$("#zongkongtiaojianTable").append(tableTr);
		    	//var zongKongShiTi = new ZongKongShiTi(item.setId,item.itemId,item.logicOperator,item.comboType,item.conditionVal,item.relaOperator);
		    	var zongKongShiTi = new ZongKongShiTi(item.setId,item.itemId,item.relaOperator,item.comboType,item.conditionVal,item.logicOperator);
		    	zongkongtiaojianMap.put(item.conditionId,zongKongShiTi);
			});
		}
	}); 
}
//行条件
function jspLoadHang(){
	var templateId = $("#templateId").val();
	$.ajax({
	   type: "POST",
	   url: ctx+"/reportTemplateConditionsController/getHangCondByTemplateId/"+templateId,
	   success:function(data){
		    $.each(data,function(idx,item){
		    	var tableTr = handleDataHang(item.chineseName,item.itemChineseName,item.jspRelaOperatorShow,item.conditionVal,
		    			item.jspComboTypeShow,item.conditionId,item.jspLogicOperatorShow,item.relRowNum);
		    	$("#hangtiaojianTable").append(tableTr);
		    	//var hangShiTi = new HangShiTi(item.setId,item.itemId,item.logicOperator,item.comboType,item.conditionVal,item.relaOperator,item.relRowNum);
		    	var hangShiTi = new HangShiTi(item.setId,item.itemId,item.relaOperator,item.comboType,item.conditionVal,item.logicOperator,item.relRowNum);
		    	hangtiaojianMap.put(item.conditionId,hangShiTi);
			});
		}
	}); 
}
//列条件
function jspLoadLie(){
	var templateId = $("#templateId").val();
	$.ajax({
	   type: "POST",
	   url: ctx+"/reportTemplateConditionsController/getLieCondByTemplateId/"+templateId,
	   success:function(data){
		    $.each(data,function(idx,item){
		    	//var letterStr = letterMapNum.get(item.relColNum);
		    	var letterStr = letterArray[item.relColNum-1];
		    	var tableTr = handleDataLie(item.chineseName,item.itemChineseName,item.jspRelaOperatorShow,item.conditionVal,item.jspComboTypeShow,item.conditionId,item.jspLogicOperatorShow,letterStr);
		    	$("#lietiaojianTable").append(tableTr);
		    	//var lieShiTi = new LieShiTi(item.setId,item.itemId,item.logicOperator,item.comboType,item.conditionVal,item.relaOperator,item.relColNum);
		    	var lieShiTi = new LieShiTi(item.setId,item.itemId,item.relaOperator,item.comboType,item.conditionVal,item.logicOperator,item.relColNum);
		    	lietiaojianMap.put(item.conditionId,lieShiTi);
			});
		}
	}); 
}
/*--------------------------------------------------------页面加载时，加载所有总控条件，行列条件---------------------------------------------*/
